# 用户结构建立
Users = {
    "小红":{"password": "123", "status": True},
    "jack":{"password": "456", "status": True},
    "user1":{"password": "123456", "status": False},
}

# 验证三次
for i in range(3):
    # 信息收集
    user = input("请输入您的用户名：")
    pwd = input("请输入您的密码：")

    # 逻辑判断
    if user in Users and pwd == Users[user]["password"]:
        connected_user = Users[user]
        if connected_user['status']:
            print("登录成功")
            break
        else:
            print("账户失效，请联系管理员!")
    else:
        print("账户不存在或者密码错误!")


